'use strict';

function spilt_to_zero(number, interval) {
  let arr=[];
  if(number%interval===0){
    for(let i=0;i<=number/interval;i++){
      arr.push(number-i*interval);
    }
  }
  else {
    for(let i=0;i<=parseInt(number/interval+1);i++){
      arr.push(number-i*interval);
    }
  }
  let arr1=[];
  for(let num of arr){
    arr1.push(parseFloat(num.toFixed(1)));
  }
  return arr1;
}

module.exports = spilt_to_zero;
